#pragma once

#include "sqlite_wrapper.h"
#include "user.h"
#include "session.h"
#include "bcrypt.h"
#include <string>

/// @file database_manager.h
/// @brief Database manager for the authentication system
/// 
/// This file defines the DatabaseManager class which handles
/// the creation and management of the SQLite database connection.
/// Uses dependency injection pattern instead of singleton.

/// @class DatabaseManager
/// @brief Manager for database operations
/// 
/// This class manages the SQLite database connection and
/// provides controlled access to it through dependency injection.
class DatabaseManager {
public:
    /// @brief Constructor
    /// @param db_path Path to the database file
    DatabaseManager(const std::string& db_path);

    /// @brief Get reference to the database connection
    /// 
    /// @return DatabaseConnection& Reference to the database connection object
    DatabaseConnection& getDatabaseConnection();

    /// @brief Initialize the database schema
    /// 
    /// Creates the database tables and initial data if needed.
    void initialize();

private:
    DatabaseConnection db_;
};